<?php


class filereader{

	private $contents;
	function __construct($_filename){
		$this->contents = file_get_contents($_filename);//打开文件
	}
	function replace($from,$to){
		$this->contents = str_replace('<{'.$from.'}>',$to,$this->contents);
	}
	function output(){
		return $this->contents;
	}


//$str=str_replace("要替换的内容","替换成的内容",$str);
//file_put_contents("nianling.php",$str);//把替换的内容写到.php文件中	
}

?>